﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CVS.DAL;
using CVS.WebAPI.Models;

namespace CVS.WebAPI.Mappers
{
    public static class SubmissionsMapper
    {
        public static List<SubmissionDto> MapSubmissions(List<Submission> submissions)
        {
            var submissionsDtos = submissions.Select(submission => new SubmissionDto
            {
                Id = submission.Id,
                IsSuccessful = submission.IsSuccessful,
                IsProcessed = submission.IsProcessed
            }).ToList();

            return submissionsDtos;
        }
    }
}